package com.panfeng.xcloud.gateway.filters.http;

import javax.servlet.ServletOutputStream;
import javax.servlet.WriteListener;
import java.io.ByteArrayOutputStream;

class BufferedServletOutputStream extends ServletOutputStream {

    private ByteArrayOutputStream ostream;

    public BufferedServletOutputStream(ByteArrayOutputStream ostream) {
        this.ostream = ostream;
    }

    @Override
    public void write(int b) {
        ostream.write(b);
    }

    @Override
    public boolean isReady() {
        return false;
    }

    @Override
    public void setWriteListener(WriteListener writeListener) {

    }
}